var assert = require("assert");
var chai = require("chai");
var chaihtp = require("chai-http");
var app = require("../index");
var should = chai.should();
chai.use(chaihtp);
describe("Array", function () {
  describe("#indexOf()", function () {
    it("should return -1 when the value is not present", function () {
      assert.equal([1, 2, 3].indexOf(4), -1);
    });
  });
});
describe("App", () => {
  it("should respond status 200", (done) => {
    chai
      .request(app)
      .get("/b")
      .query({ name: 1, age: 2 })
      .end((err, res) => {
        res.should.have.status(200);
        done();
      });
  });
  it("should respond status 200", (done) => {
    chai
      .request(app)
      .post("/a")
      .send({ name: 1, age: 2 })
      .end((err, res) => {
        res.should.have.status(200);
        done();
      });
  });
});
